import { Inject } from '@midwayjs/core';
import { CoolController, BaseController } from '@cool-midway/core';
import { RecipeCategoryEntity } from '../../entity/category';
import { RecipeCategoryService } from '../../service/category';

/**
 * 菜谱分类
 */
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: RecipeCategoryEntity,
  service: RecipeCategoryService,
  pageQueryOp: {
    keyWordLikeFields: ['a.name'],
    fieldEq: ['a.status'],
    addOrderBy: {
      orderValue: 'ASC',
    },
  },
})
export class AdminRecipeCategoryController extends BaseController {
  @Inject()
  recipeCategoryService: RecipeCategoryService;
}
